package wicresoft.servicesImp.gongXu;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import wicresoft.orm.dao.GxCheckPlanMapper;
import wicresoft.orm.entity.GxCheckPlan;
import wicresoft.orm.entity.GxCheckPlanExample;
import wicresoft.services.gongXu.GxCheckPlanServices;

import java.util.List;

/**
 * Created by Administrator on 2018/3/12.
 */
@Service
public class GxCheckPlanServicesImp implements GxCheckPlanServices {
    @Autowired
    GxCheckPlanMapper gxCheckPlanMapper;

    public GxCheckPlan selectById(String id) throws Exception {
        GxCheckPlanExample gxCheckPlanExample = new GxCheckPlanExample();
        gxCheckPlanExample.createCriteria().andIdEqualTo(id);
        List<GxCheckPlan> gxCheckPlanList = gxCheckPlanMapper.selectByExample(gxCheckPlanExample);
        if (gxCheckPlanList.isEmpty()) {
            return null;
        } else {
            return gxCheckPlanList.get(0);
        }

    }
}
